home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / daemons / nfs / nfs-serv.2be / nfs-serv / nfs-server-2.2beta16 / README.mm < prev    next >
Encoding:
Text File  |  1995-11-12  |  7.9 KB  |  202 lines

  1. .COVER
  2. .TL
  3. The LINUX User-Space NFS Server(\*F)
  4. 'FS
  5. This is a rewrite of the original README file (which you can now find in
  6. README.HISTORIC).
  7. .FE
  8. .AU "Version 2.2
  9. .AF "
  10. .COVEND
  11. .\"
  12. .\"
  13. .\"
  14. .\"
  15. .\"
  16. .H 1 "Overview
  17. .\"
  18. This package contains all necessary programs to make your Linux machine
  19. act as an NFS server, being an NFS daemon (\fIrpc.nfsd\fP), a mount daemon
  20. (\fIrpc.mountd\fP), optionally, the uid mapping daemon (\fIrpc.ugidd\fP), and the
  21. showmount utility.  It was originally developed by Mark Shand, and
  22. further enhanced by Donald Becker, Rick Sladkey, Orest Zborowski, Fred
  23. van Kempen, and Olaf Kirch.
  24. .P
  25. Unlike other NFS daemons, the Linux \fInfsd\fP runs entirely in user space.
  26. This makes it a
  27. tad slower than other NFS implementations, and also makes it hard
  28. to support a couple of UNIX file system features supported by other \fInfsd\fP
  29. implementations, especially several concurrent server processes.
  30. .\"
  31. .\"
  32. .\"
  33. .H 1 "Building and installing unfsd
  34. .\"
  35. To compile and install the programs in this package, you first have to
  36. run the BUILD script. It will ask you a couple of questions about your
  37. preferred configuration. It tries to be helpful by informing you about
  38. why it asking you which question, but a brief overview may be useful
  39. nevertheless:
  40. .DL
  41. .LI "\fBuid/gid mapping:\fP
  42. Occasionally, you will want to serve NFS clients whose assignment
  43. of uids and gids to user names differs from that on the client. The
  44. unfsd package offers you a mechanism to dynamically map the client's uid
  45. space to that of the server, and vice versa. This is achieved by running
  46. the \fIrpc.ugidd\fP daemon on the client machine, and instructing the server
  47. machine to use it to map the client's credentials presented to the server
  48. in an NFS call, and remap file owner information in all NFS replies.
  49. .P
  50. While this is convenient, it also presents a security problem because
  51. \fIrpc.ugidd\fP can be abused by attackers to obtain a list of valid user
  52. names for the client machine. This can be helped somewhat by making
  53. ugidd check the requester's IP address against the \fIhosts.allow\fP
  54. and \fIhosts.deny\fP files also used by the \fItcpd\fP wrapper
  55. program.
  56. .P
  57. Therefore, the BUILD script asks you about whether you want to use ugidd
  58. at all, and if you do, whether you wish to protect it using the host access
  59. control files. Note that you still have to configure access control as
  60. described below.
  61. .P
  62. If you do enable host access checking for \fIrpc.ugidd\fP, the BUILD script
  63. will try to locate \fIlibwrap.a\fP which is needed for this. This library
  64. is part of Wietse Venema's TCP wrapper package. BUILD looks in several
  65. standard locations such as \fI/usr/lib\fP. If it does not find the library
  66. (e.g. because you keep it in weird places like \fI/usr/i486-linux/lib\fP),
  67. it will ask you for its full path name.
  68. .P
  69. If you disable \fIugidd\fP support, the daemon will not be compiled, and
  70. the manpage will not be installed.
  71. .P
  72. .LI "\fBfile access control:\fP
  73. For security reasons, \fImountd\fP and \fInfsd\fP make sure that vital
  74. files such as \fI/etc/exports\fP are owned by the correct user and have
  75. an appropriate access mode. BUILD will ask you which user and group
  76. should own \fIexports\fP.  By default, this will be root/root.
  77. .LI "\fBmount request logging:\fP
  78. If you enable this option, \fIrpc.mountd\fP will log all attempts to mount a
  79. directory via NFS from your server machine. This is very helpful in
  80. monitoring NFS server usage, and for catching attempts at attcking your
  81. machine via NFS.
  82. .P
  83. When enabled, \fImountd\fP will log all successful mount attempts to
  84. \fIsyslog\fP's \fBdaemon\fP facility at level \fBnotice\fP. Failed mount
  85. attempts are logged at level \fBwarning\fP.
  86. .LE
  87. .P
  88. After completing these questions, BUILD will run a configure script to
  89. detect certain system capabilities. This will take a while on your first
  90. attempt. Repeated invocations of configure will run a lot faster because
  91. the results of the tests are cached. If you want to start out with a fresh
  92. build on a different release of Linux, you should make sure to get rid of
  93. these cached values by running `\fCmake distclean\fP' first.
  94. .P
  95. You can then compile and install \fInfsd\fP by typing `\fCmake\fP' and/or
  96. (as root) `\fCmake install\fP.' This will also install the manual pages.
  97. .\"
  98. .\"
  99. .\"
  100. .H 1 "Configuring \fInfsd\fP
  101. .\"
  102. To turn your Linux box into an NFS server, you have to start the
  103. following programs from \fI/etc/rc.d/rc.inet2\fP (or wherever your favorite
  104. Linux distribution starts network daemons from):
  105. .DL
  106. .LI *
  107. \fIrpc.portmap\fP
  108. .LI *
  109. \fIrpc.mountd\fP
  110. .LI *
  111. \fIrpc.nfsd\fP
  112. .LI *
  113. \fIrpc.ugidd\fP (optional)
  114. .LI *
  115. \fIrpc.pcnfsd\fP (optional, not contained in this package)
  116. .LE
  117. .P
  118. To make directories available to NFS clients, you have to enter
  119. them in your \fIexports\fP file along with the hosts allowed to mount them.
  120. The list of options and a sample file are given in the \fIexports(5)\fP
  121. manual page (and the whole topic is covered quite extensively in the
  122. Linux Network Administrator's Guide anyway), so I will not discuss this
  123. here. If somebody feels like filling in the missing parts here, please
  124. send me the diffs.
  125. .P
  126. .\"
  127. .\"
  128. .\"
  129. .H 1 "Configuring \fIrpc.ugidd\fP access control
  130. To protect \fIrpc.ugidd\fP from unauthorized access, you just have to add lines
  131. to \fI/etc/hosts.allow\fP and/or \fI/etc/hosts.deny\fP detailing which
  132. NFS servers that are allowed to access it. If your NFS server has the IP
  133. address 193.175.30.33, you would add the following to \fIhosts.allow\fP:
  134. .VERBON 22
  135. # Allow ugidd access only to NFS server
  136. ugidd: 193.175.30.33
  137. .VERBOFF
  138. .P
  139. .\"
  140. .\"
  141. .\"
  142. .H 1 "Common Problems (a.k.a. Dependencies)
  143. .DL
  144. .LI *
  145. Root squashing is enabled by default, which means that requests from the
  146. root user are treated as if they originated from the nobody user. If you
  147. want root on the NFS client to be able to access files with full prvilege,
  148. you have to add \fBno_root_squash\fP to the option list in \fI/etc/exports\fP.
  149. .LI *
  150. The most specific entry applies. This means if you export both \fI/usr\fP
  151. and \fI/usr/local\fP to a client, and the client mounts \fI/usr\fP from the
  152. server, the options for \fI/usr/local\fP will still apply when the client
  153. accesses 
  154. .LI *
  155. Wildcards in client names only do not match dots. This means that the entry
  156. \fB*.foo.com\fP only matches hosts named \fBjoe.foo.com\fP etc, but not
  157. \fBjoe.sales.foo.com\fP. You may call this a bug (and I may replace the
  158. current pattern matching code with wildmat if there is enough demand).
  159. .LI *
  160. Changes to the \fIexports\fP file do not take effect until both
  161. \fInfsd\fP and \fImountd\fP have re-read the file. You either have to
  162. kill both daemons and restart them, or send them a HUP signal:
  163. .VERBON 22
  164. # killall -HUP \fIrpc.mountd\fP \fIrpc.nfsd\fP
  165. .VERBOFF
  166. .LI *
  167. NFS operation between two Linux boxes can be quite slow. There are a number
  168. of reasons for this, only one of which is that unfsd runs in user space.
  169. Another (and much worse) problem is that the Linux NFS \fIclient\fP code
  170. currently does no proper caching, read-ahead and write-behind of NFS data.
  171. This problem can be helped by increasing the RPC transfer size on the client
  172. by adding the `\fBrsize=8192,wsize=8192\fP' mount options. This will at least
  173. improve throughput when reading or writing large files. You are still in a
  174. lose-lose situation when applications write data line by line or with
  175. no output buffering at all.
  176. .LE
  177. .H 1 Copyright
  178. Much of the code in this package was originally written by Mark Shand,
  179. and is placed under the following copyright:
  180. .P
  181. .B
  182. .in +3n
  183. .ll -6n
  184. This software may be used for any purpose provided the above
  185. copyright notice is retained. It is supplied as is, with no
  186. warranties expressed or implied.
  187. .ll +6n
  188. .in -3n
  189. .R
  190. .P
  191. Other code, especially that written by Rick Sladkey and some replacement
  192. routines included from the GNU libc, are covered by the GNU General
  193. Public License, version 2, or (at your option) any later version.
  194. .\"
  195. .\"
  196. .\"
  197. .H 1 "Bug Reports
  198. .\"
  199. If you think you have encountered a bug in \fInfsd\fP or any of the other
  200. programs in this package, please follow the instructions in the file
  201. BUGS.
  202.